package com.wzy.sharepreferenceutil;

import android.content.Context;

/**
 * 保存设置或其他配置数据
 *
 * Created by wangzhenyu on 2016/7/23.
 */
public class SettingSp extends BaseSharePreference {

    private static SettingSp mSettingSp;

    private Context mContext;

    private static final String SHARED_PREFS_FILE_NAME = "com.wzy_preferences_setting";

    private static final byte[] sLock = new byte[0];

    private SettingSp(Context context) {
        mContext = context.getApplicationContext();
        init(mContext, SHARED_PREFS_FILE_NAME);
    }

    public static SettingSp getInstance(Context context) {

        synchronized (sLock) {
            if (mSettingSp == null) {
                mSettingSp = new SettingSp(context);
            }
        }

        return mSettingSp;
    }
}
